/**
 * This is a Letter class that is one of the children of Package. It has a few basic methods like an expicit and default 
 * value constructors along with toString() and getPackageType().
 * This class does everything it needs to create a Letter, with all the needed attributes. Its almost identical to Box
 * but it doesn't have the height.
 *
 * <p><b>
 * Extra Credit:
 * </b><pre>
 * No extra credit was offered on this assignment
 * </pre><b>
 *
 * History:
 * </b><pre>
 * 5/04/2007 started writing the program
 * 5/08/2007 continued working on it
 * 5/09/2007 finished writing the program
 * </pre>
 *
 * @author  Veniamin Kozubenko
 * @see     "No Borrowed Code" 
 *     	
 */

public class Letter extends Package
{

	private int _length;
	private int _width;
	
	public Letter()
	{ } // End default value constructor
	
	public Letter(int trackingNumber, int weight, int length, int width)
	{
		super(trackingNumber, weight);
		_length = length;
		_width = width;
	
	} // End default value constructor
	
	public String getPackageType()
		{ return "letter"; }
	
	public String toString()
	{
		String temp;
		temp = "\n\nPackage Type: letter\n";
		temp += super.toString();
		temp += "\nWeight: ";
		if (super.getWeight() > 1)
			temp += super.getWeight() + " ounces";
		else 
			temp += super.getWeight() + " ounce";
		if (_length > 1)
			temp += "\nLength: " + _length + " inches";
		else 
			temp += "\nLength: " + _length + " inch";
		if (_width > 1)
			temp += "\nWidth: " + _width + " inches";
		else 
			temp += "\nWidth: " + _width + " inch";	
		return temp;

	} // End toString method

	
	


} // End class Truck